#pragma once

//includes for the class
#include "Component.h"
#include "Common.h"
#include "Sprite.h"
#include "Engine.h"
#include "SpriteAnimation.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>



//Constants used
#define WIDTH 9
#define HEIGHT 9
#define HIGHT 56
#define LENGTH 66
#define OFFSETX 10
#define OFFSETY 10

//class used in the game with all functions and variables
class BaloonCrush:public Component
{
public:
	//constructeur
	BaloonCrush();
	//destructeur
	~BaloonCrush();

	//void Notify(const InputEvent& event);
	void Update(unsigned int t);
	void InitiateGrid(int grid[WIDTH][HEIGHT]);
	bool CheckLigne3(int grid[WIDTH][HEIGHT]);
	bool CheckColonne3(int grid[WIDTH][HEIGHT]);
	void Notify(const InputEvent& event);
	void EndGame(int *grid[WIDTH][HEIGHT]);
	//void GenerateBaloon(grid[WIDTH][HEIGHT]);
	//void ReStartGame(event);

private:
	Sprite* texcursor;
	Sprite* texballonrouge;
	Sprite* texballonorange;
	Sprite* texballonbleue;
	Sprite* texballonverte;
	int grid[WIDTH][HEIGHT];
	int randomBaloon;
};

